ci: fix connected tests - #60
Merged
Merged
Conversation
The KMP migration (222b0d8) switched the workflow to 'connectedDebugAndroidTest' and archive only app/shared report dirs. Since :app: has product flavors and :shared: uses the KMP android target, that aggregate task only matched :core:, whose reports were never archived. The artifact directory stayed empty and upload-artifact silently skipped uploading (default warn). - Archive :core: reports alongside app/shared ones - Upload with if-no-files-found: error so an empty archive fails the job instead of silently succeeding
'connectedDebugAndroidTest' only matched :core: — :app: has product flavors and :shared: is a KMP android target, so their device-test tasks have different names and never ran on CI (#48, #49). - app: connectedUnstableDebugAndroidTest (unstable flavor only for now; tests are identical across flavors, and unstable is the main line) - core: connectedDebugAndroidTest - shared: connectedAndroidDeviceTest (no test sources yet, kept so future shared device tests run automatically) Build step assembles the same explicit set before the emulator starts.
- set -euo pipefail so unexpected failures (e.g. adb unavailable) abort the script instead of limping on - archive_reports now verifies every module listed in TEST_TASKS produced a non-empty report dir before copying, failing loudly when not — previously a missing dir silently produced an empty artifact (commit ffa831a) - deduplicate the gradle task list into TEST_TASKS (portrait/landscape previously repeated it and could drift) - note the API 24 additionalTestOutput warning observed in CI logs
API 24 emulators intermittently hang during streamed APK installs (ShellCommandUnresponsiveException -> InstallException: Failed to install-write all apks), randomly hitting whichever module installs next. Seen across CI runs since June regardless of which module is affected. - On failure, check the gradle output against known environment-instability signatures; only then restart adb and retry the stage once. Real test regressions are never retried. - Each attempt's gradle log is kept separately, and logcat + adb devices state are dumped into the artifact on retry for diagnosis.
"No compose hierarchies found" is the rarer variant of the same environment stall (activity failed to launch on a device that hung mid-install), seen in the July 4 CI run.
283375
force-pushed
the
ci/fix-connected-tests
branch
from
August 29, 2026 16:45
5e2500f to
eaa8cd3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the connectedAndroidTest workflow after the KMP migration (222b0d8). Supersedes and closes #49. Also closes #48.
Background
Since 222b0d8 only
:core:tests actually ran on CI (the aggregate task name doesn't match the flavored:app:or the KMP:shared:modules), the artifact was always empty (reports archived from the wrong modules, failures silenced by\|\| true), and API 24 jobs failed frequently on emulator install hangs.Commits
:core:reports too, upload withif-no-files-found: error:app:(unstable flavor),:core:,:shared:device tests now actually runset -euo pipefail, fail loudly when expected report dirs are missing, dedupe task listVerification
API 24 and API 36 both fully green; the retry path was naturally exercised (landscape install hang → retry → pass) with diagnostics present in the artifact.
API level /
defaulttarget intentionally unchanged (minSdk 24, no Google services requirement).